---
title: DICOM
sidebar_position: 14
---

While neuroimaging researchers often prefer simpler formats like NIfTI, clinical imaging is dominated by DICOM. A key challenge with classical DICOM is that it stores each 2D slice in a separate file, resulting in hundreds or thousands of files per series—though the newer enhanced DICOM standard addresses this. DICOM also supports various compression methods (transfer syntaxes), adding further complexity. NiiVue provides multiple mechanisms to handle DICOM data effectively.

## Using dcm2niix with NiiVue

[dcm2niix](https://github.com/rordenlab/dcm2niix) is a widely used command-line tool for converting DICOM images to NIfTI. It can be used on the backend for preprocessing, or compiled to WebAssembly (WASM) and bundled as an [npm package](https://www.npmjs.com/package/@niivue/dcm2niix) for frontend use. This enables drag-and-drop DICOM support directly in the browser, as demonstrated in the [niivue-dcm2niix project](https://github.com/niivue/niivue-dcm2niix) which includes a [live demo](https://niivue.github.io/niivue-dcm2niix/).

## DICOM Manifests

Unlike enhanced DICOM, classic DICOM stores a single 2D image per file. Therefore, 3D volumetric data is stored in multiple files. A DICOM manifest is a text file that contains a list of relative URLs of DICOM files. Again, the [niivue-dcm2niix project](https://github.com/niivue/niivue-dcm2niix) provides a [live demo](https://niivue.github.io/niivue-dcm2niix/) for using manifest files. Specifically, it includes a button to load [this manifest file](https://niivue.github.io/niivue-demo-images/dicom/niivue-manifest.txt).